﻿
using System;
using System.Data;
using System.Data.SqlClient;
namespace Model
{
	
	/// <summary>	 
	/// 订单表
	/// </summary>
	public class DbOrders
	{ 
		#region DbOrders
		/// <summary>
		/// 
		/// </summary>
		public DbOrders()
		{
		}
		/// <summary>	 
		/// 
		/// </summary>
		public DbOrders(Int32 oId)
		{
			this.oId = oId;
		
		}
		/// <summary>	 
		/// 
		/// </summary>		
		public DbOrders(DataRow dr)
		{
			int.TryParse(Convert.ToString(dr["oId"]),out oId);
			this.oSN = Convert.ToString(dr["oSN"]);
			this.oProdName = Convert.ToString(dr["oProdName"]);
			int.TryParse(Convert.ToString(dr["oProdId"]),out oProdId);
			int.TryParse(Convert.ToString(dr["oProdClass"]),out oProdClass);
			this.oProdPrices = Convert.ToDecimal(dr["oProdPrices"]);
			int.TryParse(Convert.ToString(dr["oProdNum"]),out oProdNum);
			int.TryParse(Convert.ToString(dr["oUserId"]),out oUserId);
			this.oTotalPrices = Convert.ToDecimal(dr["oTotalPrices"]);
			this.oNotes = Convert.ToString(dr["oNotes"]);
			if(dr["oBuyTime"] != DBNull.Value)
				this.oBuyTime = Convert.ToDateTime(dr["oBuyTime"]);
			this.oIsDelived = Convert.ToInt16(dr["oIsDelived"]);
			this.oUserName = Convert.ToString(dr["oUserName"]);
			this.oUserTel = Convert.ToString(dr["oUserTel"]);
			this.oUserAddress = Convert.ToString(dr["oUserAddress"]);
			
		}
		#endregion
		
		
		#region OId
		private Int32 oId;
		/// <summary>	 
		/// 
		/// AutoInc
		/// PK
		/// </summary>
		public Int32 OId
		{
			get{ return oId; }
			set{ oId= value; }
		}
		#endregion
		
		#region OSN
		private System.String oSN;
		/// <summary>	 
		/// 订单号
		/// </summary>
		public System.String OSN
		{
			get{ return oSN; }
			set{ oSN= value; }
		}
		#endregion
		
		#region OProdName
		private System.String oProdName;
		/// <summary>	 
		/// 产品名称
		/// </summary>
		public System.String OProdName
		{
			get{ return oProdName; }
			set{ oProdName= value; }
		}
		#endregion
		
		#region OProdId
		private Int32 oProdId;
		/// <summary>	 
		/// 产品ID
		/// </summary>
		public Int32 OProdId
		{
			get{ return oProdId; }
			set{ oProdId= value; }
		}
		#endregion
		
		#region OProdClass
		private Int32 oProdClass;
		/// <summary>	 
		/// 产品类型Id
		/// </summary>
		public Int32 OProdClass
		{
			get{ return oProdClass; }
			set{ oProdClass= value; }
		}
		#endregion
		
		#region OProdPrices
		private Decimal oProdPrices;
		/// <summary>	 
		/// 销售单价
		/// </summary>
		public Decimal OProdPrices
		{
			get{ return oProdPrices; }
			set{ oProdPrices= value; }
		}
		#endregion
		
		#region OProdNum
		private Int32 oProdNum;
		/// <summary>	 
		/// 销售数量
		/// </summary>
		public Int32 OProdNum
		{
			get{ return oProdNum; }
			set{ oProdNum= value; }
		}
		#endregion
		
		#region OUserId
		private Int32 oUserId;
		/// <summary>	 
		/// 用户ID
		/// </summary>
		public Int32 OUserId
		{
			get{ return oUserId; }
			set{ oUserId= value; }
		}
		#endregion
		
		#region OTotalPrices
		private Decimal oTotalPrices;
		/// <summary>	 
		/// 销售总价
		/// </summary>
		public Decimal OTotalPrices
		{
			get{ return oTotalPrices; }
			set{ oTotalPrices= value; }
		}
		#endregion
		
		#region ONotes
		private System.String oNotes;
		/// <summary>	 
		/// 备注
		/// </summary>
		public System.String ONotes
		{
			get{ return oNotes; }
			set{ oNotes= value; }
		}
		#endregion
		
		#region OBuyTime
		private DateTime oBuyTime;
		/// <summary>	 
		/// 销售时间
		/// </summary>
		public DateTime OBuyTime
		{
			get{ return oBuyTime; }
			set{ oBuyTime= value; }
		}
		#endregion
		
		#region OIsDelived
		private Int16 oIsDelived;
		/// <summary>	 
		/// 是否发货
		/// </summary>
		public Int16 OIsDelived
		{
			get{ return oIsDelived; }
			set{ oIsDelived= value; }
		}
		#endregion
		
		#region OUserName
		private System.String oUserName;
		/// <summary>	 
		/// 用户名
		/// </summary>
		public System.String OUserName
		{
			get{ return oUserName; }
			set{ oUserName= value; }
		}
		#endregion
		
		#region OUserTel
		private System.String oUserTel;
		/// <summary>	 
		/// 联系电话
		/// </summary>
		public System.String OUserTel
		{
			get{ return oUserTel; }
			set{ oUserTel= value; }
		}
		#endregion
		
		#region OUserAddress
		private System.String oUserAddress;
		/// <summary>	 
		/// 收货地址
		/// </summary>
		public System.String OUserAddress
		{
			get{ return oUserAddress; }
			set{ oUserAddress= value; }
		}
		#endregion

	}
}
